package com.yami.shop.manager;

import com.yami.shop.bean.app.dto.ShopCartDto;
import com.yami.shop.bean.app.dto.ShopCartItemDto;
import com.yami.shop.bean.app.param.ChangeShopCartParam;
import com.yami.shop.bean.vo.ShopCartWithAmountVO;
import com.yami.shop.common.response.ServerResponseEntity;

import java.util.List;

/**
 * 套餐+赠品购物车组装
 * @author 菠萝凤梨
 */
public interface ComboShopCartManager {
    /**
     * 事件
     * 计算套餐 + 赠品，组合购物车 + 购物车金额
     * @param shopCartWithAmount 购物车列表和金额信息
     */
    void calculateComboAndMakeUpShopCartAndAmount(ShopCartWithAmountVO shopCartWithAmount);

    /**
     * 购物车计算套餐 + 赠品
     * @param shopCarts 购物项
     * @return 组装好的购物项
     */
    List<ShopCartDto> calculateDiscountAndMakeUpShopCart(List<ShopCartDto> shopCarts);

    /**
     * 套餐加入购物车
     * @param param
     * @param userId
     * @param shopCartItems
     * @return
     */
    ServerResponseEntity<String> comboAddCart(ChangeShopCartParam param, String userId, List<ShopCartItemDto> shopCartItems);

    /**
     * 套餐改变购物车sku
     * @param param
     * @param userId
     * @param shopCartItems
     * @return
     */
    ServerResponseEntity<String> comboChangeCart(ChangeShopCartParam param, String userId, List<ShopCartItemDto> shopCartItems);

}
